/// 系统向用户推送消息表
class ClientUserMsgEntity {
  /// 主键id
  final int? id;
  /// 售卖用户ID
  final int? userId;
  /// 消息类型
  final String? msgType;
  /// 消息内容
  final String? msgContent;
  /// 推送时间
  final String? pushTime;
  /// 是否已读，1是0否，默认0
  final int? readed;
  /// 备注
  final String? remark;
  /// 卡片代码
  final String? cardCode;
  /// 图片地址，核销拒绝或提现拒绝时，该字段必填
  final String? imgUrl;
  /// 订单号
  final String? orderNum;

  ClientUserMsgEntity({
    this.id,
    this.userId,
    this.msgType,
    this.msgContent,
    this.pushTime,
    this.readed,
    this.remark,
    this.cardCode,
    this.imgUrl,
    this.orderNum,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (id != null) data['id'] = id;
    if (userId != null) data['userId'] = userId;
    if (msgType != null) data['msgType'] = msgType;
    if (msgContent != null) data['msgContent'] = msgContent;
    if (pushTime != null) data['pushTime'] = pushTime;
    if (readed != null) data['readed'] = readed;
    if (remark != null) data['remark'] = remark;
    if (cardCode != null) data['cardCode'] = cardCode;
    if (imgUrl != null) data['imgUrl'] = imgUrl;
    if (orderNum != null) data['orderNum'] = orderNum;
    return data;
  }

  factory ClientUserMsgEntity.fromJson(Map<String, dynamic> json) {
    return ClientUserMsgEntity(
      id: json['id'],
      userId: json['userId'],
      msgType: json['msgType'],
      msgContent: json['msgContent'],
      pushTime: json['pushTime'],
      readed: json['readed'],
      remark: json['remark'],
      cardCode: json['cardCode'],
      imgUrl: json['imgUrl'],
      orderNum: json['orderNum'],
    );
  }
}